import request from '@/utils/request'

export function page(data) {
  return request({
    url: `/prefix/page`,
    method: 'post',
    data
  })
}


export function savePrefixNetxTb(data) {
  return request({
    url: `/prefix/savePrefixNetxTb`,
    method: 'post',
    data
  })
}

export function getByNodeId(id) {
  return request({
    url: '/prefix/getByNodeId/' + id,
    method: 'get'
  })
}

export function deletePrefix(id) {
  return request({
    url: '/prefix/delete/' + id,
    method: 'delete'
  })
}

export function getAllByOrgId(orgId) {
  return request({
    url: '/prefix/getAllByOrgId?orgId=' + orgId,
    method: 'get'
  })
}



export function checkHasPrefix(prefix,id) {
  return request({
    url: '/prefix/checkHasPrefix?prefix=' + prefix + '&id=' + id,
    method: 'get'
  })
}

export function checkHasBindOrg(orgId,id) {
  return request({
    url: '/prefix/checkHasBindOrg?orgId=' + orgId + '&id=' + id,
    method: 'get'
  })
}

